]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
MessageTray: fix reentrancy when calling out to the grab helper
authorGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 10 Sep 2012 22:44:28 +0000 (00:44 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 10 Nov 2012 16:36:00 +0000 (17:36 +0100)
Similar to 683546. I'm not sure where this bug lives, but let's make
the code robust.

https://bugzilla.gnome.org/show_bug.cgi?id=683986

js/ui/messageTray.js

index 6a2e43005dd33a72069abcad1e002082e54eee6c..f1687d0f5accbc217df58d2edb057ea0dcafa66e 100644 (file)
@@ -2310,6 +2310,18 @@ const MessageTray = new Lang.Class({
     },
 
     _hideNotification: function() {
+        // HACK!
+        // There seems to be a reentrancy issue in calling .ungrab() here,
+        // which causes _updateState to be called before _notificationState
+        // becomes HIDING. That hides the notification again, nullifying the
+        // object but not setting _notificationState (and that's the weird part)
+        // As then _notificationState is stuck into SHOWN but _notification
+        // is null, every new _updateState fails and the message tray is
+        // lost forever.
+        //
+        // See more at https://bugzilla.gnome.org/show_bug.cgi?id=683986
+        this._notificationState = State.HIDING;
+
         this._grabHelper.ungrab({ actor: this._notification.actor });
 
         if (this._idleMonitorBecameActiveId) {